package com.vipboot.platform.system.controller.monitor;

import com.vipboot.framework.core.domain.R;
import com.vipboot.framework.mybatisplus.core.page.PageData;
import com.vipboot.framework.mybatisplus.core.page.PageQuery;
import com.vipboot.platform.system.crud.service.monitor.SysOperateLogService;
import com.vipboot.platform.system.domain.bo.SysOperateLogBo;
import com.vipboot.platform.system.domain.vo.SysOperateLogVo;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.ModelAttribute;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 * 操作日志记录 前端控制器
 * </p>
 *
 * @author daze
 * @since 2024-12-10
 */
@RequiredArgsConstructor
@RestController
@RequestMapping("/sysOperateLog")
public class SysOperateLogController {

    private final SysOperateLogService sysOperateLogService;

    /**
     * 分页查询操作日志记录。
     *
     * @param pageQuery 分页对象
     * @return 分页对象
     */
    @GetMapping("/page")
    public R<PageData<SysOperateLogVo>> page(@ModelAttribute SysOperateLogBo bo,
                                             @ModelAttribute PageQuery pageQuery) {
        return R.ok(sysOperateLogService.page(bo, pageQuery));
    }

}
